-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,972 additions
and
1 deletion.
There are no files selected for viewing
Submodule macOS Test App
deleted from
f621ff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# macOS Test App | ||
|
||
This is a test app for macOS using the curl, openssl and nghttp2 libraries. | ||
|
||
## Screenshots | ||
|
||
macOS Test Build | ||
|
||
<img width="641" alt="Image" src="https://github.com/user-attachments/assets/a05b76b5-2052-4033-be18-fdf45f7342e0" /> | ||
|
||
## Build Instructions | ||
|
||
Build the libraries with macOS support: | ||
|
||
```bash | ||
# Standard Build | ||
./build.sh | ||
|
||
# Option: Build only macOS | ||
./build.sh -p macos | ||
``` | ||
|
||
Load and build the project using Xcode. Example lib binaries (xcframework) and header files are included but will be replaced when you run the build script. | ||
|
||
## New Project Setup Details | ||
|
||
If you are setting up a new Xcode project, there are few things you will need to set up. These are all set up for you already in the xcodeproj file: | ||
|
||
* You will also need to add the xcframework files (libs) and header files (include). You will also need to add libz.tbd, liblapd.tgb, CoreFoundation.framework, and SystemConfiguraiton.framework to the Xcode project ("General"). | ||
<img width="482" alt="Image" src="https://github.com/user-attachments/assets/29fd3b15-f130-41cd-91d8-689a6b8b3f50" /> | ||
|
||
* You will need to allow "Outgoing Connection (Client)" in the "Signing & Capabilities" of the project target "Sandbox" settings. | ||
<img width="482" alt="Image" src="https://github.com/user-attachments/assets/cd7f5e68-bc3e-4b5c-94d6-cb44c4c2ad23" /> | ||
|
713 changes: 713 additions & 0 deletions
713
example/macOS Test App copy/macOS Test App.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...macOS Test App copy/macOS Test App.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...p copy/macOS Test App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// AppDelegate.h | ||
// macOS Test App | ||
// | ||
// Created by Jason Cox on 1/19/25. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import <curl/curl.h> | ||
#import <openssl/ssl.h> | ||
|
||
@interface AppDelegate : NSResponder <NSApplicationDelegate> | ||
|
||
@property (strong, nonatomic) NSWindow *window; | ||
|
||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// AppDelegate.m | ||
// macOS Test App | ||
// | ||
// Created by Jason Cox on 1/19/25. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
|
||
@interface AppDelegate () | ||
|
||
|
||
@end | ||
|
||
@implementation AppDelegate | ||
|
||
|
||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { | ||
// Insert code here to initialize your application | ||
// libcurl - see http://curl.haxx.se/libcurl/ | ||
curl_global_init(0L); | ||
} | ||
|
||
- (void)applicationWillTerminate:(NSNotification *)aNotification { | ||
// Insert code here to tear down your application | ||
// libcurl cleanup | ||
curl_global_cleanup(); | ||
} | ||
|
||
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app { | ||
return YES; | ||
} | ||
|
||
@end |
11 changes: 11 additions & 0 deletions
11
...ple/macOS Test App copy/macOS Test App/Assets.xcassets/AccentColor.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
example/macOS Test App copy/macOS Test App/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "512x512" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "512x512" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
example/macOS Test App copy/macOS Test App/Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
783 changes: 783 additions & 0 deletions
783
example/macOS Test App copy/macOS Test App/Base.lproj/Main.storyboard
Large diffs are not rendered by default.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
example/macOS Test App copy/macOS Test App/ViewController.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// ViewController.h | ||
// macOS Test App | ||
// | ||
// Created by Jason Cox on 1/19/25. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import <curl/curl.h> | ||
#import <openssl/ssl.h> | ||
|
||
@interface ViewController : NSViewController | ||
{ | ||
IBOutlet NSTextField *_urlText; // user field for URL address | ||
IBOutlet NSTextView *_resultText; // user field for resulting cURL data | ||
IBOutlet NSButton *_getButton; // user button to start GET | ||
IBOutlet NSTextField *_appTitle; // application title to update for version | ||
|
||
// CURL global data | ||
CURL *_curl; // curl handle | ||
NSData *_dataToSend; | ||
size_t _dataToSendBookmark; | ||
NSMutableData *_dataReceived; | ||
NSString *cacertPath; // path to cacert.pem file | ||
} | ||
|
||
@property (retain, nonatomic) NSTextField *_urlText; | ||
@property (retain, nonatomic) NSTextView *_resultText; | ||
@property (retain, nonatomic) NSButton *_getButton; | ||
@property (retain, nonatomic) NSTextField *_appTitle; | ||
|
||
- (IBAction)Get: (id)sender; // action method to run GET | ||
|
||
@end | ||
|
Oops, something went wrong.