NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 196 forks source link

Xcode version in iOS Cloud Builds + Error: OIDAuthorizationService+IOS.m normal armv7 objective-c #5158

Open Sauvetonbio opened 4 years ago

Sauvetonbio commented 4 years ago

Is your feature request related to a problem? Please describe. When trying to add the new "sign-in with Apple" feature with "nativescript-firebase" plugin, using cloud builds, we got this error : CONSOLE LOG file:///node_modules\nativescript-plugin-firebase\firebase.js:865:24: 'Error in firebase.login: ReferenceError: Can\134't find variable: ASAuthorizationAppleIDProvider'

Describe the solution you'd like Update tools (Xcode) in cloud builds infrastructre.

More info : https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/1491

Thank you.

Sauvetonbio commented 4 years ago

We are also getting this error during the cloud build. It's related to the auth service from Firebase, still using the "nativescript-firebase" plugin.

\tCompileC /tmp/builds/_/d480723adf9bab509a22b71c25e628361710f2ee/6.2.2/6.2.0/SauveTonBio/platforms/ios/DerivedData/SauveTonBio/Build/Intermediates.noindex/ArchiveIntermediates/SauveTonBio/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/AppAuth.build/Objects-normal/armv7/OIDAuthorizationService+IOS.o AppAuth/Source/iOS/OIDAuthorizationService+IOS.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler \tCompileC /tmp/builds/_/d480723adf9bab509a22b71c25e628361710f2ee/6.2.2/6.2.0/SauveTonBio/platforms/ios/DerivedData/SauveTonBio/Build/Intermediates.noindex/ArchiveIntermediates/SauveTonBio/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/AppAuth.build/Objects-normal/armv7/OIDAuthState+IOS.o AppAuth/Source/iOS/OIDAuthState+IOS.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (2 failures) ** ARCHIVE FAILED **

billforde commented 4 years ago

I am also getting errors with nativescript-plugin-firebase when doing a cloud build;

[19-11-25 23:38:34.694] Build failed. Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:02:05.195] [WARN] ARCHIVE FAILED The following build commands failed: [00:02:05.197] [WARN] CompileC /tmp/builds//9294f26804c485b4e8c9d42c114a845a39a3a63c/6.2.2/6.2.0/which/platforms/ios/DerivedData/which/Build/Intermediates.noindex/ArchiveIntermediates/which/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/AppAuth.build/Objects-normal/armv7/OIDExternalUserAgentIOSCustomBrowser.o /tmp/builds//9294f26804c485b4e8c9d42c114a845a39a3a63c/6.2.2/6.2.0/which/platforms/ios/Pods/AppAuth/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.m normal armv7 objective-c com.apple.compilers.llvm.clang.10.compiler CompileC /tmp/builds//9294f26804c485b4e8c9d42c114a845a39a3a63c/6.2.2/6.2.0/which/platforms/ios/DerivedData/which/Build/Intermediates.noindex/ArchiveIntermediates/which/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/AppAuth.build/Objects-normal/armv7/OIDExternalUserAgentIOS.o /tmp/builds/_/9294f26804c485b4e8c9d42c114a845a39a3a63c/6.2.2/6.2.0/which/platforms/ios/Pods/AppAuth/Source/iOS/OIDExternalUserAgentIOS.m normal armv7 objective-c com.apple.compilers.llvm.clang.10.compiler CompileC /tmp/builds//9294f26804c485b4e8c9d42c114a845a39a3a63c/6.2.2/6.2.0/which/platforms/ios/DerivedData/which/Build/Intermediates.noindex/ArchiveIntermediates/which/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/AppAuth.build/Objects-normal/armv7/OIDExternalUserAgentCatalyst.o /tmp/builds/_/9294f26804c485b4e8c9d42c114a845a39a3a63c/6.2.2/6.2.0/which/platforms/ios/Pods/AppAuth/Source/iOS/OIDExternalUserAgentCatalyst.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (3 failures) [00:02:06.623] [ERROR] ARCHIVE FAILED

ngocnt1 commented 4 years ago

i got stuck on this error to build my app with 6.2.2 CLI, i tried to downgrade to 6.2.1 but not still the same the errors. It worked well before upgrade to 6.2.2 cli

anyone has a clue?

ngocnt1 commented 4 years ago

@Sauvetonbio how is it doing? In my side,i did a work around like this:

Sauvetonbio commented 4 years ago

Hello @ngocnt1 , I’m waiting for a fix, I work on my app without auth enabled. I will try your solution as well. Thank you.

ngocnt1 commented 4 years ago

Hi @Sauvetonbio , with "tns-core-modules": "~6.2.3", i can make it work on cloud build, but unfortunately, the Apple sign-in is still not working. That's fine for the other firebase auth types.(username password, phone, etc...). I hope it will be fixed in coming 6.3

xpediteur commented 4 years ago

NS 6.2.1 i get following error building ios In file included from /Users/ralfborde/FirebaseData/platforms/ios/Pods/AppAuth/Source/iOS/OIDAuthorizationService+IOS.m:21: /Users/ralfborde/FirebaseData/platforms/ios/Pods/AppAuth/Source/iOS/OIDExternalUserAgentCatalyst.h:28:26: error: expected ',' API_AVAILABLE(macCatalyst(13)) API_UNAVAILABLE(ios) ^ 2 errors generated. ** BUILD FAILED ** What can i do there ? THX

ngocnt1 commented 4 years ago

Currently i don't have issue with IOS like that. I'm on NS 6.3.3 and with package.json as below: "nativescript": { "id": "org.<>.<>", "tns-ios": { "version": "6.3.0" }, "tns-android": { "version": "6.3.1" } }, "description": "*****", "license": "SEE LICENSE IN ", "repository": "", "dependencies": { "@angular/animations": "~8.2.0", "@angular/common": "~8.2.0", "@angular/compiler": "~8.2.0", "@angular/core": "~8.2.0", "@angular/forms": "~8.2.0", "@angular/platform-browser": "~8.2.0", "@angular/platform-browser-dynamic": "~8.2.0", "@angular/router": "~8.2.0", "@nativescript/theme": "~2.2.0", "@ngx-translate/core": "^11.0.1", "nativescript-angular": "~8.20.0", "nativescript-geolocation": "^5.1.0", "nativescript-insomnia": "^1.2.3", "nativescript-oauth2": "^2.3.0", "nativescript-plugin-firebase": "^10.3.3", "nativescript-sha": "^1.0.3", "nativescript-ui-autocomplete": "~6.0.0", "nativescript-ui-calendar": "~6.0.0", "nativescript-ui-chart": "~7.0.0", "nativescript-ui-dataform": "~6.0.0", "nativescript-ui-gauge": "~6.0.0", "nativescript-ui-listview": "~8.0.1", "nativescript-ui-sidedrawer": "~8.0.0", "reflect-metadata": "~0.1.12", "rxjs": "^6.5.4", "tns-core-modules": "~6.3.0", "tns-platform-declarations": "~6.3.0", "zone.js": "~0.9.1" }, "devDependencies": { "@angular/compiler-cli": "~8.2.0", "@ngtools/webpack": "~8.2.0", "nativescript-dev-webpack": "~1.4.0", "typescript": "~3.5.3" }, "gitHead": "fa98f785df3fba482e5e2a0c76f4be1fa6dc7a14", "readme": "NativeScript Application" }