expected identifier or '(' after zipping on a windows machine - ios

Background
I brought a project down from a GIT repository to a windows machine, zipped it up, and put it on a Google drive.
I then pulled it down to my Mac, unzipped it and where it worked before on my other Mac, I am now getting the following error.
/Users/myname/Desktop/cmh.pubweb.theapp/TheApp/TheApp-Bridging-Header.h:1:9: note: in file included from /Users/myname/Desktop/cmh.pubweb.theapp/TheApp/TheApp-Bridging-Header.h:1:
#import <Google/Analytics.h>
^
/Users/myname/Desktop/cmh.pubweb.theapp/Pods/Headers/Public/Google/Google/Analytics.h:1:1: error: expected identifier or '('
../../../../Google/Headers/Analytics.h
^
<unknown>:0: error: failed to import bridging header '/Users/myname/Desktop/cmh.pubweb.theapp/TheApp/TheApp-Bridging-Header.h'
Notables
- I am running this on xcode 9.1 whereas my other Mac had an earlier version.
- It was written in Swift 3.
What I have done
Read just about every example of this error on Stackoverflow and applied suggestions without success.
Hit google and found one example where someone had an issue with windows doing something to one of the files. I didn't quite understand what they were getting at and applying the suggested fix didn't work out.
I have deleted the entire build folder.
I have performed "Clean Build Folder" without success.
I hesitate to post this as it seems to be a very vague error that has been tackled from a dozen different directions but I am at a loss after a day of trying to hunt this down.
Any suggestions are greatly appreciated.

The general practice is to only commit the Podfile to the repository and not the Pod folder. If that is the case, you will need to setup Pods on your new mac. Make sure you have cocoapods installed and setup on your new mac and then run pod install in your project directory

Based partially on the answer posted by #Malik
Deleted the POD directory in the root of the project folder
Deleted the Podfile.lock file. (left Podfile in place)
Downloaded CocoaPods App https://cocoapods.org/app (this was due to running into cert expiration issues even though all expired certs had been removed. Seems the app deals with it.)
Installed CocoaPods to the target app.
Also changed the project explicite location in the PodFile to reflect the current location in my system.
This resolved the current issues.

Related

Xcode 14.0 Command PhaseScriptExecution failed

After updating Xcode to 14.0 (and accompanying Xcode Command Line Tools), and building my application as I normally would, I'm running into the error you see above. This is a pretty well documented error, but I've tried every solution I've been able to find:
Investigating Keychain settings
Running pod deintegrate and pod install
Cleaning the build folder
Logging off and shutting everything down and turning things back on / logging back in
Entering arm64 as an excluded architecture and subsequently removing it from the .xcworkspace
Combinations of all the above
Ensuring all the Pods I have are not out of date.
I'm at a loss. Your input is greatly appreciated. Thank you.
As it turns out, there was a file generated as part of the build process (I don't know exactly what) with some flag set that I didn't think I needed, so I just deleted it and rebuilt the app. No issues there.
Solution: it helps to comb through staged commits to see if there's anything created that simply isn't needed, and to delete those files ad hoc.

'FBSDKShareKit/FBSDKShareKit.h' file not found

I've made an IOS build on Unity for an App we're making after adding the facebook SDK, moved the build on a hard drive and tried to build it on xcode on the mac we have at the office, as I always do before uploading it to the app store. I ran into this error and I've been stuck on this issue for 2 full work days and it's driving me a bit crazy, here are the thing's I've tried:
-Install cocoapods, both on the default terminal directory and on the project's directory (I'm not too experienced with cocoapods so I don't know if that made a difference. I also did pod update while standing on the project directory).
-I saw that the IOS resolver has an option called "generate pod files" that people said needed to be checked when building to solve this issue. It was checked by default on my project, so that wasn't it.
-Added the framework path on the build settings to where the facebook SDK is at (though the way it looked on my xcode seemed a bit different than the way I've seen it on other people's xcode screenshots)
-Tried commenting out some #include lines on the headers that are generating the issue. It only produced more errors.
-People said to open the project from the workspace instead of the xcodeproject but unity doesn't seem to generate a workspace file.
-Tried downgrading the Facebook SDK to a previous version but the versions people claim are working don't seem to be on the repository anymore, so it doesn't let me downgrade to them.
At the moment I'm trying to make it work with the latest Facebook SDK which is 9.0.0.
Any help would be appreciated, please let me know if I'm not being specific enough about the issue or if there's any information about my project I should include on the post
The .xcworkspace should be created by Cocoapods, not by Unity directly.
If you already have the Podfile generated, just run pod install on the project directory and open the created .xcworkspace file after Cocoapods finishes installing the external dependencies.

Missing Frameworks from Cocoapods after switching computers

I recently switched computers and brought over my project but when I opened the workspace I noticed that all of my frameworks via Cocoapods were missing.
I closed the workspace and went into the folder directory and deleted the current xcworkspace, 'Pod' folder, and podfile.lock file, and ran a pod update and pod install. I also deleted the Derived Data for safety measures. However, after reopening the newly created workspace the frameworks were still missing and I am getting an error saying that functions that are within my frameworks have been renamed.
Can anyone point me to another solution? I feel like I've tried just about everything that I could find on here and what I know. Thanks in advance!
Missing Frameworks
Framework Incorrect Full Path
Function Renamed Errors
The frameworks are probably missing because they've not been built yet, but they will show up the first time you run the project.
The function rename warnings are probably because you're using a newer version of Xcode that is using Swift 4.2 by default. Usually the easiest way to tackle this is to upgrade your Pods to newer versions.

Xcode 9 - linker command failed with exit code 1

While compiling the application getting as following error
" compiled with older version of Swift language (3.0) than previous files (4.0) file "
Could you please help me?
Use the xcworkspace to build instead of the xcproject?
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
Delete the derived data and do a clean build.
And if you are building a framework, make sure you've selected Generic IOS Device while building or set the Build for Active Architecture only as true in Build Settings.
I think this happens because you changed your app name or maybe the target
look to solve this problem see your target in Podfile
and then come back to your xcode in the targets
select your target app and in linked Frameworks and Libraries (the last one down) see if there's
any pods with light color and a strange name than your target in the podfile
and remove it using the minus button down .
I'd rather fix the specific problem, but if none of the other answers worked a full reset can solve it. If you are getting this error and you are also getting error readouts that refer to "duplicate symbol files", AND all other efforts have failed, then a full reset could work for you.
What worked for me:
Read the error report to identify the repo that supposedly contains duplicate files.
Drag repo to the trash.
re-clone your repo.
set up your repo with correct remote tracking. git remote add <url.git>, or git remote set-url <url.git>
This absolutely worked for me. In my case for some elusive reason, when I ran git pull upstream develop for a local dependency, git would pull in/generate duplicate files from multiple commits.
After following the above steps, the issue went away and git pull upstream develop was no longer pulling from multiple commits at once. Perhaps there was a weird git cache for my repo.
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
I am probably late for you, but for future devs in problems...
If you have been manipulating the podfile or creating new targets or maybe changing the name of any of them, check that in build phases options your just have correct pod framework for the name of the targets.
if you have pod
first clean project and close Xcode then open terminal and go to folder of Project then pod update
open the project and run
in my case work!
I fixed this problem today by running the app in the simulator using the target associated with the bundle file named in the Build Settings-->Bundle Loader setting of the test target. Previously I had deleted my derived data folder while working on a different target that has a different Product Name than the one associated with the test target bundle file. Rerunning the app in the simulator must have recreated the bundle file in the derived data folder that the test target is looking for and then my tests started running fine.

build TVOS Example App with React Native using github.com/douglowder/react-native-appletv build errors

I am new to development, I have followed instructions, downloaded a zip of the dev's project,unzip,cd to folder, ran npm install and npm start
In the example app folders when trying to build in Xcode I get numberous React/RCT{file} file not found and will highlight an invalid import statement such as #import
I have been chasing this issue around github for days, tried numerous fixes such as updating the schemes, making an extra cocopods file that references the libraries functions
Anyone have a solution to this referencing problem?
these kinds of errors
https://github.com/facebook/react-native/issues/13371
Frankly I mightnt even be installing the project folder correctly, I dont know
thanks

Resources