apple itunes connection troubles
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 7.2.0
- Cross-platform modules: 7.1.4
- iOS Runtime: 7.1.1
- XCode Version: 12.4
Describe the bug
After several weeks since the last update of our application, I tried to upload a new version to testflight.
Unfortunately all commands tns apple-login and tns appstore fail with
The server returned unexpected response: Unauthenticated
Request ID: <id-string>.0.0
Using the same credentials to log onto any of the apple developer websites continues to work fine.
Any idea what's going wrong here and how to fix it?
Not sure what's wrong, however you can get your app on Testflight by archiving & uploading it through XCode.
ns prepare ios --release(+ any additional flags you'd use in your release build)open platforms/ios/<appname>.xcworkspace- Product > Archive
- When done, the Archive Manager should pop up - where you can hit the "Upload to AppStore" (or something similar, can't recall the exact text of the button)
Thank you. That also did not work at first, but this way I found the signing problem that apparently got introduced with an XCode or MacOS update.
Hmm, the signing trouble has gone away, but the error for ns appstore ... is still here.
When opening the XCode project after tns build ... I now see an error:
ld: framework not found AFNetworking
But I'm not using AFNetworking and have uninstalled all modules which referenced it.
A grep for the string only show a match in binary file ./platforms/ios/myProject.xcodeproj/..../UserInterfaceState.xcuserstate
Selecting "Project > Archive" makes this error go away but shows a new one:
ld: framework not found CocoaLumberjack
Before that XCode also shows several ld-warnings, one each for the external Pods:
ld: warning: directory not found for option '-F/Users/myuser/Library/Developer/Xcode/DerivedData/myProject-<someIdString>/Build/Products/Debug-iphoneos/CocoaLumberjack'
Not sure why the linker is looking into the Debug-iphoneos directory for a release build.
And not even a tns debug ios before the build fixes that.
Any more ideas what I could do?
@ray007 I would clear DerivedData (find path in XCode > Settings > Locations), and clean the project & rebuild. These seem like failed cocoapod installs, could be temporary or something wrong with your local cocoa install. Perhaps try pod repo update and see if that makes a difference.
@rigor789 Thank you, but cleaning the DerivedData directory and rebuilding only changes the directories the linker is complaining about.
Seems I have a problem with the CocoaLumberjack pod which I need to get under control. Strange since testing on my attached iPad works.
I'll come back for the appstore problem once I hopefully overcome my linker problems...
Trying to find my problem by testing the step bottom-up, it seems the release build does not work anymore on ios.
Testing with ns debug ios or ns run ios works fine, but trying ns run ios --release starts the app and immediately closes it.
Nothing on the console seems to point at an obvious problem, anything I should look for?
Or should I make a new issue with this?
You could try attaching the source of the runtime & then running it in release mode from XCode:
- Follow guide from https://github.com/NativeScript/ns-v8ios-runtime#attaching-the-runtime-to-a-nativescript-app
- just the clone & attaching part, no need to install cmake, llvm etc - these are required for building it only.
ns prepare ios --releaseopen platforms/ios/<projectName>.xcworkspace- refer to step 1 - and drop v8 runtime in your project
- hit run in xcode & observe logs, and where it crashes
@rigor789 thanks for the pointer, I'll sure need that one soon.
But I've managed to avoid the crash for now (see linked issue), but I'm back at the link-problem when trying Product > Archive in XCode.
Only now the missing directories and framework not found errors point to material design stuff.
Since removing first the downloader and the the svg plugin (which worked before the most recent ios/macos update) only shifted the problem, I'd assume the problem is not (only) with the plugins, but there is a more fundamental problem.
No idea if the Unauthenticated-error from ns appstore is a consequence of that problem or something different.
All right, after lot's of searching and finally opening the correct .xcworkspace instead of the .xcodeproj file, Product > Archive has worked.
Thanks to apple for only showing the folder in the project open shortlist 😠
So I'm back at the initial problem, ns appstore ... still does not work.