How to fix ERROR ITMS-90680 StickerPackExtension.appex is not contained in a correctly named directory. It should be under "PlugIns" - xcode

Using XCode 10.2.1
Submitting my first stickers app for iOS for testing.
When uploading archive to itunesconnect I'm now getting this error:
ERROR ITMS-90680: "Invalid directory. The bundle Payload/App
Name.app/App Name StickerPackExtension.appex is not contained in a
correctly named directory. It should be under "PlugIns".
My project structure is now:
App Name
- Stickers.xcstickers
- Products
- App Name.app
- App Name StickerPackExtension.appex
I don't see any way to move .appex to a PlugIns folder (non existing) as the error suggests.
Additionally the project structure is the default structure I'm getting when creating "Sticker Pack App" in Xcode.
So I'm not sure why is the process complaining about the .appex being in a wrong directory and I have no idea how to fix this to proceed further.
Any help appreciated!

for me the problem was that extension was included in Copy Bundle Resources build phase. Make sure it's not there, it should be only under Dependencies and Embed App Extension build phases

Related

After I added Sentry to react-native project, apps deployed to itunes store crash (on Android or ios simulator it works fine)

I added react-native-sentry to a react-native project. I followed this manual: https://docs.sentry.io/clients/react-native/
Everything worked fine on Android and ios emulator. But when I tried to archive an app in xcode I got this error.
React native symbol handling failed
The Sentry build step failed while running in the background. You can ignore this error or view details to attempt to resolve it. Ignoring it might cause your crashes not to be handled properly.
If I click 'Show Details; I get this
error: EOF while parsing a value at line 1 column 0
I followed the advice from here https://github.com/getsentry/react-native-sentry/issues/135 and edited Build Phases > Upload Debug Symbols so now there is only this line there
export SENTRY_PROPERTIES=sentry.properties
The error still persisted. So I decided to ignore it. In this case after I upload the version to Itunesconnect and install it with a TestFlight it crashes immediately on start.
If I run it on a simulator or install it directly an iphone it works fine.
It also works fine on Android.
Could you give me any advice what can be done to make it work on Apple Store too?
For me this error was signaled by Xcode because of some problems when running the build scrips.
Using:
https://github.com/getsentry/sentry-react-native
#sentry/react-native": "^1.0.9
I fixed it keeping the index.ios.js always in the root folder (before that I had it in a src folder and trying to use a custom build script to take it from src)
I set the build scripts in Xcode to be similar to the ones from sentry docs:
Build RN code and images script:
// sentry properties file located in `ios` folder
export NODE_BINARY=node
export SENTRY_PROPERTIES=sentry.properties
../node_modules/#sentry/cli/bin/sentry-cli react-native xcode \
../node_modules/react-native/scripts/react-native-xcode.sh
Upload debug symbols script:
I have this script as the last one in Build Phases
export SENTRY_PROPERTIES=sentry.properties
../node_modules/#sentry/cli/bin/sentry-cli upload-dif
"$DWARF_DSYM_FOLDER_PATH"
Note:
1) I haven't tried yet to move sentry.properties file as common for both android and iOS, placed in root folder (with import ../sentry.properties in scripts) but I think that should work too.
2) I used the terminal to test directly the release build:
react-native run-ios --configuration Release --simulator "iPhone 8"
or
react-native run-ios --configuration Release --device "Your Device Name"
In my case the reason was a space included in the name of the hard disk I use to keep the Project, Derived Data and Archives. Looks like the Sentry CLI script doesn't like spaces in the path to the project and it crashes there.
It was enough to rename the disk and update paths to Derived Data and Archives and all is well now.

Titanium Android module fails with "does not have a main jar file"

I've created my own new Android Titanium module. The module build was successful and I have the artefact in the dist directory.
I've dropped the zip file inside my project, setup tiapp.xml, cleaned the project, but when running on the device I'm getting the red screen saying
Uncaught Error: Requested module not found: com.myproject.mymodule
I even tried extracting the zip manually and not let Studio do it. I cleaned the project several times.
Why wouldn't it find my module?
EDIT
I now notice a WARN message while compiling the app:
Module com.myproject.mymodule version 1.0.0 does not have a main jar file
I'm doing an ant build from eclipse and everything seems fine. I see the jar file created and present in the module directory inside my project.
Was facing the same error right now and I had a look at the place the error messages appears. It's searching for module.manifest.name.toLowerCase() + '.jar'. So have a look at the modules/android/com.myproject.mymodule/1.0/ folder: the jar file should have the name that is inside the mainifest file (name tag)
The the warning should disappear and the module should be loaded correctly.
You can try doing packaging the module in SDK location or in the particular project and see if things work. What I have always done is packaging the module in SDK location and add it in tiapp.xml of the project I want to use the module without facing any error like this.

MBProgressHud Swift Compile Error when Archiving

I already finished my project, it works and runs perfectly on the simulator or in my own device. When I select to Archive the project to upload de build to Itunes Connect, I get all these compile errors
"Use of undeclared type MBProgressHUD"
"Use of unresolved identifier MPProgressHUD"
And so on..
NOTE: I'm using CocoaPods for this library
What solved it for me was adding import MBProgressHUD in the classes where I use this library, not only in the Bridge-Header.h
Navigate to your project build settings and find the “Swift Compiler – Code Generation” section (You may find it faster to type in “Swift Compiler” into the search box to narrow down the results)
Next to “Objective-C Bridging Header” you will need to add the name/path of your header file. If your file resides in your project’s root folder simply put the name of the header file there. Examples: “ProjectName/ProjectName-Bridging-Header.h” or simply “ProjectName-Bridging-Header.h”.
Refer this link http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/
Welcome to Cocoapods Hell (a.k.a. : where the magic ends), where one must dive into his project build settings and make sense of what went wrong...
It's very hard to answer to you, as any number of reasons might be causing that.
Do you use the same target for Build / Run & Archive ? It might be because your libPods.a isn't copied into your Archive target
Have you installed Pods using pod install , have you tried playing that command again. (yes, faced with magic going wrong, one can sometimes rely on magic to save him again)
'Build' and 'Archive' product often differ in the build configuration they use (Build most of the time uses 'debug' configuration, while Archive uses 'release' configuration... ). Check your Pods configuration files (debug/release) and make sure they both include your MBProgressHud. Also, in your Project 'Info', check which pods Xcode configuration files are selected for 'debug' and 'release'
Good luck !
(PS : as MBProgressHud is a single file, and one you can often change, another solution is to get rid of Cocoapods and just copy/paste it)

Archive Validation Error: Your Application Bundle must install to /Applications

For the release of my OSX - Application I changed the name from a working title to the final title. I changed the project name with file inspector.
The Project now contains several Periods (.) in its title.
Following files changed:
- contents-xcworkspacedata
- user.xcuserdatad
- (Application name)-info.plist
- project.pbxproj
- (Application name).xcsheme
and now I get this error during archive validation:
Archive Validation Error: Your Application Bundle must install to /Applications
I reviewed my project target and the target directory is correct:
I also have a static-library as sub-project(target) in my workspace. But there the deployment is set to "Skip install"
How can I correct this problem?
Update:
I forgot to mention that I had to hardcode the Bundle Identifier to avoid a renaming.
The application directory is set with the variable $(LOCAL_APPS_DIR)
Removing the punctuation in the app-name solved the problem.
It seems the validation process is using a regular expression like .*.app. And filenames with several "." cannot be matched.

How to bundle an openframeworks application in xcode (relative resource linking?)

An trying to get openframeworks to build me my application so that i can open it from anywhere and it will load the needed images from within the apps Resources folder.
I believe this is relative linking?
I have done it before, on an older xcode and oF 61.
To do this i dragged the needed images into the project file on the left and added it to the executable target, with in a 'build phase' -> 'copy files'.
Been trying all sorts of methods, ofSetDataPathRoot() which solved the problem last time isnt working for me this time.
Any ideas/help would be appreciated!
Thanks
First you need to tell xCode to copy your /bin/data directory into your application bundle by adding a build phase:
1. Click on your project in the Project Navigator
2. Select "Build Phases"
3. Toggle open the "Run Script" section and paste in the following:
cp -r bin/data "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources";
Then tell your app where to find the data folder relative to itself within the bundle.
Inside the setup method of your oF app:
ofSetDataPathRoot("../Resources/data/");
ofSetDataPathRoot() should solve this problem. Perhaps you are setting the replacement root path incorrectly?
Try calling ofToDataPath() yourself on a string path and print out the result, then use Terminal and cd inside the .app bundle to check if the path sounds correct. Paths are expressed relative to the location of the actual executable inside the .app bundle, so if the executable is at myApp.app/Contents/MacOS/myApp and the data files are at myApp.app/Contents/Resources then ofToDataPath( "texture.png" ) should return something like ../Resources/texture.png.
You can double-check the current working directory (myApp.app/Contents/MacOS in my example) by calling getcwd(), open up a terminal and type man getcwd for more info on that.
oF now sets data path root and does internal calls to ofToDataPath() by default. What version are you using?
Have you looked inside the product's package contents to make sure your resources are getting copies in the proper build phase?

Resources