Post

Replies

Boosts

Views

Activity

Cannot get Xcode archive Distribution to install on iOS Device
When I airdrop my archived app to my device it runs perfectly. But when I try to share with colleagues using the manifest.plist in a website link, the app will not install (Even on the same device where the airdropped app did). I get "Unable to Install [app name]" Any help with this will be appreciated. Here is my manifest.plist: `<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>items</key> <array> <dict> <key>assets</key> <array> <dict> <key>kind</key> <string>software-package</string> <key>url</key> <string>https://www.scorcent.com</string> </dict> <dict> <key>kind</key> <string>display-image</string> <key>url</key> <string>https://www.scorcent.com/image_57x56.png</string> </dict> <dict> <key>kind</key> <string>full-size-image</string> <key>url</key> <string>https://www.scorcent.com/image_512x512.png</string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string>ScorCent</string> <key>bundle-version</key> <string>6.0</string> <key>kind</key> <string>software</string> <key>platform-identifier</key> <string>com.apple.platform.iphoneos</string> <key>title</key> <string>NO REGRETS</string> </dict> </dict> </array> </dict> </plist> `And here is my web url; <a href=itms-services://?action=download-manifest&url=https://www.scorcent.com/manifest.plist" Install App
0
0
213
Oct ’24
AVPlayer doesn't work in app
Hello: I am adding a video file to my MAC application. Before I create an archive, the video plays perfectly but when I run a copy of the archive, when I click on the button to start the video, NOTHING HAPPENS. No error message, Nothing. Any help to resolve this issue will be appreciated. Here is the code: This code: @IBAction func AVSegue(_ sender: Any) { let mainStoryboard = NSStoryboard(name: "Main", bundle: Bundle.main) guard let avPlayerViewController = mainStoryboard.instantiateController (withIdentifier: "AVID") as? AVPlayerViewController else { print("Couldn't find viewController" )         return         } presentAsModalWindow(avPlayerViewController)   } triggers the ViewController with the AV Player: import Cocoa import AVKit import AVFoundation class AVPlayerViewController: NSViewController {     @IBOutlet weak var playerView: AVPlayerView!         override func viewDidLoad() { super.viewDidLoad()             let url = URL(fileURLWithPath: Bundle.main.path(forResource:"SMRIntro",ofType: "mp4")!)             let player = AVPlayer(url: url)             playerView.player = player             player.play()           } }
4
0
4.3k
Aug ’22
How to Resolve Swift 5 error: "Cannot Call value of non-function type '[String]'
Hello:I have been struggling with this small piece of code foe days. Every time I resolve one problem with it, another one pops up:I seem to have resolved the problem of "Expected Pattern" but now I have the problem "Cannot call value of non-function type '[String]'Here is the code:var name = [String]() override func viewDidLoad() { super.viewDidLoad() let persistentContainer = NSPersistentContainer(name: "No_Regrets") persistentContainer.loadPersistentStores { (_, error) in if let error = error { fatalError("Failed to load Core Data stack: \(error)") } } // Creates a task with a new background context created on the fly persistentContainer.performBackgroundTask { (context) in //iterates the array let Gains = [self.gain1, self.gain2, self.gain3, self.gain4] Gains.forEach {_ in // Creates a new entry inside the context `context` and assign the array element `name` to the dog's name let gain1 = Gains(context: context) //Cannot call value of non-function type '[String]' gain1.name = name let gain2 = Gains(context: context) //Cannot call value of non-function type '[String]' gain2.name = name let gain3 = Gains(context: context) //Cannot call value of non-function type '[String]' gain3.name = name let gain4 = Gains(context: context) //Cannot call value of non-function type '[String]' gain4.name = name } do { // Saves the entries created in the `forEach` try context.save() } catch { fatalError("Failure to save context: \(error)") } }
2
1
3.9k
Jun ’22
My Menu Bar Extra Item does not display. Why?
Hello:I am creating a Menu Bar Extra Item for my MAC os App. I have the following code but nothing displays on the menu bar. W ould appreciate some advice on where in the code I need to make changes:import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { //@IBOutlet weak var window: NSWindow! let statusItem = NSStatusBar.system.statusItem(withLength:NSStatusItem.squareLength) // var item: NSStatusItem? = nil @objc func QuitScorCentMasterReview(_ sender: Any?) { NSApplication.shared.terminate(self) } func applicationDidFinishLaunching(_ aNotification: Notification) { if let button = statusItem.button { button.image = NSImage(named:NSImage.Name("SMR_icon.png")) button.action = #selector(QuitScorCentMasterReview(_:)) } func constructMenu() { let menu = NSMenu() menu.addItem(NSMenuItem(title: "End the Application", action: #selector(NSApplication.terminate(_:)), keyEquivalent: "")) statusItem.menu = menu } constructMenu() }
Topic: UI Frameworks SubTopic: AppKit Tags:
7
0
3.1k
May ’21