Developing Flutter iOS plugin packages - Pods folder in Xcode project is empty - xcode

I am developing a plugin package for Flutter. I follow the instructions exactly as written in a tutorial here: Step-2c-add-ios-platform-code-hmswift.
It says to open hello/example/ios/Runner.xcworkspace with xcode, and then:
iOS platform code of your plugin is located in Pods/DevelopmentPods/hello/Classes/ in the Project Navigator
But, when I open xcode project as specified, there is nothing under Pods folder, it is empty:
How can I fix this { I am still kinda Xcode noob } ...
EDIT: iOS specific plugin files are there on the disk, so I guess this is just some project file "wiring" bug or something like this.

The problem was that with Xcode, I have opened Runner.xcodeproj instead of Runner.xcworkspace. Hope this helps other people who did not pay full attention to Flutter Guide, like I did.

Related

How to handle MISSING_PLUGIN_EXEPTION in Flutter with Firebase Core Plugin on IOS

for several days I have tried to link my Flutter app with Firebase Database. But unfortunately, whenever I want to start debugging the compiler gives back a missing plugin exemption concerning the firebase_core package. I have already seen some entries referring to this issue here on stack overflow but none of them worked for me.
I have already followed the instruction steps by the installation guide on Firebase and included the Google Service File in my Xcode project.
I already did flutter clean, deleted the pods folder and the pod file.lock file in IOS, tried to include the Firebase SDK package by using the add package option in Xcode.
In the past, the connection between my Flutter project and the Firebase Database already worked but somehow it won't work now.
I think that my issue deals with the new step in the installation process for Firebase Connection when I am asked to make use of the Firebase SDK in Xcode.
In the following I'll add some more pictures for illustration. If someone had the same/a similar issue, it would be a huge help for me.
error Message
podfile
main_dart
Xcode runner workspace including google Service
AppDelegate in Xcode
pubspec yaml

Executable Not Found. xxx.app is not a valid path to an executable file

Details
Executable Not Found
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /Users/riber/Library/Developer/Xcode/DerivedData/digitalCurrency-hiyiyrokjaydkiagjimlwohehrtu/Build/Products/Debug-iphonesimulator/digitalCurrency.app is not a valid path to an executable file. Please rebuild the project to ensure that all required executables are created. Check your project settings to ensure that a valid executable will be built.
System Information
macOS Version 11.4 (Build 20F71)
Xcode 12.5 (18205) (Build 12E262)
Timestamp: 2021-06-11T16:34:20+08:00
Check if all files are available.
Targets -> Build Phases -> Compile Sources
If you see faint files, then they need to be removed or added.
Under "Build Settings" - "Architectures" check that you don't have "arm64" excluded under "Excluded architectures" for release, as all new iOS devices use this architecture.
I'm also get the same error. Let me share how I fix it.
I write cpp code on vscode.
I deleted a .cpp/.h file that I didn't need anymore a few days ago.
Everything nice and happy when I working on vscode.
".app is not a valid path" appeared when i switched back to the xcode to verification function.
I was confused.
(I don't immediately remember my delete operation a few days ago)
The key isn't the dialog showed "Executable Not Found",
Switch to "Issue Navigator" and drag to the bottom...
Now the ERROR shows up in front of U:
Finally the solution is :
TARGETS -> Select your ‘Target' -> Build Phases -> Compile Sources :
Select the ".cpp" file that had been delete, then "Remove Items" by click the second "-" button in the lower left corner.
I fixed it by adding x86_64 to VALID_ARCHS. Build Setting search "VALID_ARCHS",check the x86_64 is there or not, add and run.It worked with me .
resolve it using pod install.
as Frank said, I also use RN in my app.
I have tried clean derived data & even reboot, still happening
Check the Executable File in the Info(.plist). It should be named the same as your Product in Products
I have this issue on a react native application and I can resolve it reinstalling cocoaPods.
pod install
Inside the ios folder on your react native project.
Check if you have any other info.plist-s added to project.
I had similar issue when I added some pod sources (MKStoreKit) to the project - it had several info plists for different platforms which interfered with original one. Deleting wrong info plists solved the issue.
I have to delete the 'DerivedData' folder:
$ rm -Rf ~/Library/Developer/Xcode/DerivedData
EDIT: I've found a solution...
The problem in my case was because of project configurations and Pods. In the long life of my project the configuration files for the schemes changed and Xcode, using the new build system, did not like.
To fix it, just go to the Project -> Info tab. Under Configurations change the Based on Configuration value of the Targets and set them to None. Please note that I've changed only the Targets.
Now close Xcode and launch pod install from the Terminal.
reopen Xcode and launch your project.
Old answer:
I may have found a workaround to this issue... not a solution but a workaround.
I have to work on a not really recent project that was built using the Legacy System that, as you may know, is deprecated now.
While I was using Xcode 12 everything was fine. Then I installed the Xcode 13 GM and I upgrated the project to the new building system and I started to experience this issue. I have the same problem with any Xcode 13.x version. With the betas I had not, as far as I can remember.
The strange thing is that "sometimes" (I could not reproduce it sorry), the new build system worked... but just for a while.
The building phase succeeds but then, then the app is installed on simulator OR on a real device, I have that annoying message that we know...
This morning I may have find a solution...
In Xcode go to File -> Workspace Settings, keep the Legacy Build System and check the box "Do not show a diagnostic issue about build system deprecation"
Now the app builds and can be installed.
Honestly I don't know it is an Xcode bug or not... maybe it is.
if you are using git, there's huge chance there might be conflict in .pbxproj due to multiple people adding stuffs together. During the resolution xcode might try to recover those 'lost references' it got confused and unable to resolve the once there references. find those 'recovered references' in project explorer and remove them if they are invalid
Had the same issue. I deleted the simulators and added them again.
Please make sure that your runner isn't missing AppDelegate.swift or Runner-Bridging-Header.h file.
In my case, my AppDelegate.swift file and Runner-Bridging-Header.h files were deleted, so I copy and paste both the files in ios>Runner folder again from some other project (usually both of these files are same in all projects, just need to add the code lines for firebase configurations).

AudioKit 4.11.2 Playgrounds: "No such module AudioKitPlaygrounds"

It has been a year since updating so I downloaded AudioKit 4.11.2 yesterday. I built all of the frameworks, including the AudioKit and AudioKitUI xcframeworks.
Then I began playing with the Playgrounds. Right away Xcode tells me the build failed because it can't find the AudioKit frameworks. It appears that the Search Paths that are set in the original project file need tweaking so I set it to "$(inherited)../Frameworks".
Now it builds but still will not run, saying on the import AudioKitPlaygrounds statement that there is No such module AudioKitPlaygrounds.
Odd, because that is the target of the build and it exists in the Derived Data Products folder.
Searching through StackOverflow shows that AudioKit has had similar problems like this in the past but none of the proposed solutions seemed relevant to my situation.
What other tricks are necessary to get the Playgrounds running? Shouldn't it build and run straight out of the box without messing with the project search paths?
My environment is:
macOS 10.15.6
MacBookPro
Xcode 12.0.1
I ran through a similar problem with macOS 10.15.7, XCode 12.1 and AudioKit 4.11.2.
I got the same “No such module AudioKitPlaygrounds” message.
The "Build Active Scheme" option was unchecked in my File Inspector >> Playground Settings, so I checked it, rebuild the "Introduction and Hello World" .playground and it worked.
Edit (04/15/2021): David Thery gave a more complete answer in the following answers.
Also, make sure to:
run 'pod install' + automatically converting to swift5 in XCode
check "Build Active Scheme" as mentioned by Miguel FOR EACH single playgrounds you want to run.
run the playground with the play button in the editor, not the xcode main run button
If you want instead to use AudioKit in another XCode project, only two steps:
download AudioKit and AudioKitUI frameworks from here:
embed them in General > Frameworks, Libraries, and Embedded content, as shown on the screenshot below.
How did you build the frameworks? The assumption when it comes to the paths in other projects (including Playgrounds) is that they have been built via the build_frameworks.sh and build_xcframework.sh scripts in the Frameworks directory.
The end result should be a set of XCFrameworks in that same Frameworks directory, which is in turn referenced by examples and the playgrounds project.
To anyone still experiencing this issue, I just found a really simple solution. I was opening my playground files directly from 'Open Recent'. Problem is, Xcode doesn't automatically look at the parent directory and included files. Just close Xcode and open the AudioKitPlaygrounds.xcodeproj from finder. When you open your playground files from there they should work properly.

How can I build this plugin in XCode?

I'm totally new to XCode 3 (running Snow Leopard) and have no idea what I'm doing. I'm trying to
https://github.com/johan/QuickJSON
The target of this XCode file is "QuickJSON.some_extenesion". It's a QuickLook plugin which kinda looks like a lego block. I tried going to Build -> Build and I checked the build folder, but I couldn't find the target there but a bunch of other files. The only file I'm expecting to see is the QuickJSON plugin target file. Does anyne know where I can find it? Thanks!
The project Builds fine for me. Initially, the Product "QuickSON.qlgenerator" is red, but becomes available after building.
Try downloading a fresh project and press Build again.

How to set up SDL on XCODE 4?

I'm having troubles with sample templates and overall installing of SDL on my Xcode 4.
There are no tutorials and old templates just don't work!
If anybody has Xcode 4 SDL templates, please share.
EDIT:
#Joshua Nozzi I tried opening template from old version of XCODE, 3.2 and it opened, but there were no files in the project and it said - base sdk missing. I tried adding SDL.framework but it didn't help!
I just pushed my working SDL test Xcode project as a public Github repository, so feel free to see if it works for you: https://github.com/Ricket/HelloSDL

Resources