Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ios): macOS support #16

Merged
merged 6 commits into from Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions Jenkinsfile
@@ -1,10 +1,9 @@
#!groovy
library 'pipeline-library'

def isMaster = env.BRANCH_NAME.equals('master')

buildModule {
sdkVersion = '9.0.2.GA'
iosLabels = 'osx && xcode-11'
sdkVersion = '9.2.0.v20200911073932' // use a master build with ARM64 sim, and macOS support
npmPublish = isMaster // By default it'll do github release on master anyways too
iosLabels = 'osx && xcode-12'
}
2 changes: 1 addition & 1 deletion example/app.js
Expand Up @@ -19,7 +19,7 @@ var btn = Ti.UI.createButton({
});

btn.addEventListener('click', function () {
AppleSignIn.authorize();
AppleSignIn.authorize([ AppleSignIn.AUTHORIZATION_SCOPE_EMAIL, AppleSignIn.AUTHORIZATION_SCOPE_FULLNAME ]);
});

win.add(btn);
Expand Down
4 changes: 2 additions & 2 deletions ios/manifest
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 1.1.1
version: 2.0.0
apiversion: 2
architectures: arm64 x86_64 i386 armv7
description: titanium-apple-sign-in is a Swift based Titanium module.
Expand All @@ -15,4 +15,4 @@ name: titanium-apple-sign-in
moduleid: ti.applesignin
guid: cb40d586-ff2c-483e-8fac-69d1e82bd94c
platform: iphone
minsdk: 8.2.0
minsdk: 9.2.0
29 changes: 23 additions & 6 deletions ios/titanium-apple-sign-in.xcodeproj/project.pbxproj
Expand Up @@ -3,12 +3,13 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
3A2FE57222AB46BD0033BDE6 /* TiApplesigninLoginButtonProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2FE57122AB46BD0033BDE6 /* TiApplesigninLoginButtonProxy.swift */; };
3A2FE57422AB46CB0033BDE6 /* TiApplesigninLoginButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2FE57322AB46CB0033BDE6 /* TiApplesigninLoginButton.swift */; };
B74EF4B024FFE02400058F91 /* TitaniumKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = B74EF4AF24FFE02400058F91 /* TitaniumKit.xcframework */; };
DB34CDE0207B998A005F8E8C /* TiApplesigninModuleAssets.m in Sources */ = {isa = PBXBuildFile; fileRef = DB34CDDE207B998A005F8E8C /* TiApplesigninModuleAssets.m */; };
DB34CDE1207B998A005F8E8C /* TiApplesigninModuleAssets.h in Headers */ = {isa = PBXBuildFile; fileRef = DB34CDDF207B998A005F8E8C /* TiApplesigninModuleAssets.h */; settings = {ATTRIBUTES = (Public, ); }; };
DB34CDE6207B9EBD005F8E8C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB34CDE5207B9EBD005F8E8C /* Foundation.framework */; };
Expand All @@ -20,6 +21,7 @@
/* Begin PBXFileReference section */
3A2FE57122AB46BD0033BDE6 /* TiApplesigninLoginButtonProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TiApplesigninLoginButtonProxy.swift; path = Classes/TiApplesigninLoginButtonProxy.swift; sourceTree = "<group>"; };
3A2FE57322AB46CB0033BDE6 /* TiApplesigninLoginButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TiApplesigninLoginButton.swift; path = Classes/TiApplesigninLoginButton.swift; sourceTree = "<group>"; };
B74EF4AF24FFE02400058F91 /* TitaniumKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TitaniumKit.xcframework; path = "$(TITANIUM_SDK)/iphone/Frameworks/TitaniumKit.xcframework"; sourceTree = "<absolute>"; };
DB34CDDE207B998A005F8E8C /* TiApplesigninModuleAssets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TiApplesigninModuleAssets.m; path = Classes/TiApplesigninModuleAssets.m; sourceTree = SOURCE_ROOT; };
DB34CDDF207B998A005F8E8C /* TiApplesigninModuleAssets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TiApplesigninModuleAssets.h; path = Classes/TiApplesigninModuleAssets.h; sourceTree = SOURCE_ROOT; };
DB34CDE5207B9EBD005F8E8C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand All @@ -36,6 +38,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B74EF4B024FFE02400058F91 /* TitaniumKit.xcframework in Frameworks */,
DB34CDE6207B9EBD005F8E8C /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -69,6 +72,7 @@
DB34CDE2207B9D6A005F8E8C /* Frameworks */ = {
isa = PBXGroup;
children = (
B74EF4AF24FFE02400058F91 /* TitaniumKit.xcframework */,
DB34CDE5207B9EBD005F8E8C /* Foundation.framework */,
);
name = Frameworks;
Expand Down Expand Up @@ -231,6 +235,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
Expand Down Expand Up @@ -297,6 +302,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -316,7 +322,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "$(ARCHS_STANDARD)";
Expand Down Expand Up @@ -351,8 +358,12 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "$(TITANIUM_SDK)/iphone/Frameworks/**";
OTHER_CFLAGS = (
"-DDEBUG",
"-DTI_POST_1_2",
Expand All @@ -367,6 +378,7 @@
SWIFT_INCLUDE_PATHS = "$(SRCROOT)/Titanium";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VALID_ARCHS = "$(ARCHS_STANDARD)";
};
name = Debug;
Expand Down Expand Up @@ -396,8 +408,12 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "$(TITANIUM_SDK)/iphone/Frameworks/**";
OTHER_CFLAGS = "-DTI_POST_1_2";
OTHER_LDFLAGS = (
"-ObjC",
Expand All @@ -408,6 +424,7 @@
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "$(SRCROOT)/Titanium";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VALID_ARCHS = "$(ARCHS_STANDARD)";
};
name = Release;
Expand Down
8 changes: 3 additions & 5 deletions ios/titanium.xcconfig
Expand Up @@ -4,14 +4,12 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 8.2.0.v20190806082810
TITANIUM_SDK_VERSION = 9.2.0.GA

//
// THESE SHOULD BE OK GENERALLY AS-IS
//
TITANIUM_SDK = /Users/$(USER)/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION)
TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include"
TITANIUM_BASE_SDK2 = "$(TITANIUM_SDK)/iphone/include/TiCore"
TITANIUM_BASE_SDK3 = "$(TITANIUM_SDK)/iphone/include/JavaScriptCore"
HEADER_SEARCH_PATHS= $(TITANIUM_BASE_SDK) $(TITANIUM_BASE_SDK2) $(TITANIUM_BASE_SDK3)
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/Frameworks"
HEADER_SEARCH_PATHS = $(inherited) $(TITANIUM_BASE_SDK) $(TITANIUM_BASE_SDK2) $(TITANIUM_BASE_SDK3)
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/Frameworks/**"
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@titanium-sdk/ti.applesignin",
"version": "1.1.1",
"version": "2.0.0",
"description": "titanium-apple-sign-in is a Swift based Titanium module.",
"scripts": {
"commit": "git-cz",
Expand Down
2 changes: 1 addition & 1 deletion test/unit/karma.unit.config.js
Expand Up @@ -12,7 +12,7 @@ module.exports = config => {
'karma-*'
],
titanium: {
sdkVersion: config.sdkVersion || '8.2.0.v20190806082810'
sdkVersion: config.sdkVersion || '9.2.0.GA'
},
customLaunchers: {
ios: {
Expand Down