Victor Choi

  • Home
  • Business
    • Internet
    • Market
    • Stock
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Home
  • Business
    • Internet
    • Market
    • Stock
  • Downloads
    • Dvd
    • Games
    • Software
      • Office
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Uncategorized

7/19/2019

How to handle a iOS extension using fastlane

 6:17 PM     app profile, cicd, fastlane, fastlane gym, fastlane match, fastlane produce, iOS Development, notification extension, onesignal, provisioning profile     No comments   

An app that I developed uses OneSignal to send a push notification. OneSignal’s way that they provide a push notification service is using a notification extension in iOS. In this case we have a situation on iOS CI/CD process. Before you dive into handling this issue you should know that each extension in iOS has a different provisioning profile. So we need to create an app profile in Apple developer portal.

Create an app profile for your extension

You can use fastlane produce function to create an app profile for your extension. If you already have an app profile in Apple Developer portal, pass this instruction.
lane :createAppProfile do
produce(
    app_identifier: “com.victorchoi.x.OneSignalNotificationServiceExtension",
    app_name: “victorchoi OneSignalNotificationServiceExtension",
    skip_itc: true
)

Create a provisioning profile

Then you need to create a certificate and a provisioning profile for your extension. I use fastlane match to easily create and manage a certifcate and a provisioning profile.
lane :codesign do 
 match(
      app_identifier: ["com.victorchoi.x”,”com.victorchoi.x.OneSignalNotificationServiceExtension"],
      type: "appstore",
)

Download the provisioning profile and save into your CI/CD server

Lastly, you need to make sure that your CI/CD server has the provisioning profile to build. At this step, you must have two provisioning profile for your app. So let’s configure your provisioning profile in the build process. In this case, I use fastlane gym to build them.
provisioningProfiles: { 
   “com.victorchoi.ios” => "match AppStore com.victorchoi.ios“,
   “com.victorchoi.x.OneSignalNotificationServiceExtension" => "match AppStore com.victorchoi.x.OneSignalNotificationServiceExtension"
}

Building your CI/CD process takes time. So I hope this article helps you not to spend much time on it.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

No Profile for team error on Jenkins using fastlane gym

 5:03 PM     devops, fastlane, gym, iOS Development, jenkins, no profile for team, xcode     No comments   

I prefer to use a combination of Jenkins and fastlane to build and distribute my iOS application. Recently I tried to make a CI/CD server using Jenkins and fastlane and then I faced an issue that I had struggled to fix it. The issue is normally coming from a build process using gym in fastlane. The error log is normally like below.

No profile for team 'TXVIGNOXXXX’ matching ‘iPhone_Development' found: Xcode couldn't find any provisioning profiles matching 'TXVIGNOXXXX/iPhone_Development'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor 

So how do I solve this issue?

  1. Check your Provisioning Profile Mostly you can find this advice on the web. Provisioning Profile files are saved in the path /Users/{{UserAccount}}/Library/MobileDevice/Provisoning Profiles and then your right provisioning file should be there. But my case wasn’t like this. I use fastlane match to create and update Provisioning Profile and there should not be this issue.

  2. Check your Team ID Find your team ID and then check the Team ID is correct.

  3. Permission issue The third one was my issue. In my case, I use sudo command to run fastlane release. But the problem was the Provisioning Profile belongs to Jenkins user account. Then I just removed the sudo command and then now it works. Still, I am not 100% sure that the issue was caused by the permission to run fastlane command.

I hope that this article could help someone has a similar issue.

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

6/21/2019

How to prevent your Mac from sleep

 4:04 PM     Mac, mac sleep mode, macbook, macOS, macserver, preventmacfromsleep, sleep     No comments   

Then I found a Apple support link to solve this issue via a terminal command.

Open your terminal on your mac and then type the command below. sudo pmset -a disablesleep 1 That’s it. Now you can prevent your mac from the sleep mode. The support link isn’t updated by Apple anymore. So I guess that in the future Apple might force the command doesn’t work.

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

12/05/2017

A Code Sample to use Core Data Stack as a Singleton

 6:26 PM     AppDelegate, Core Data, Core Data to Singleton, Singleton     No comments   

I used to create an instance of my Core Data Stack in AppDelegate file and accessed it from other View Controllers. But I have to modify it because iOS 11 forces to access AppDelegate file in the main thread. So I made my Core Data Stack as a singleton.

If you are looking for a code sample to make your core data stack as a singleton. Please refer the code below.

class func sharedInstance() -> CoreDataStack {
    struct Static {
        static let instance = CoreDataStack()
    }
    return Static.instance
}
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

How can I detect iPhone X's screen size?

 4:32 PM     Detect iPhone X Screen, iPhone X, iPhone X Screen Size, UIScreen     No comments   

How can I detect iPhone X’s screen size?

After Apple released iPhone X I am trying to update my application for iPhone X. The UI elements to fit iPhone X I have to detect the screen size of iPhone X and I found the code below which works for me.

if UIDevice().userInterfaceIdiom == .phone {
        switch UIScreen.main.nativeBounds.height {
        case 1136:
            print("iPhone 5 or 5S or 5C")
        case 1334:
            print("iPhone 6/6S/7/8")
        case 2208:
            print("iPhone 6+/6S+/7+/8+")
        case 2436:
            print("iPhone X")
        default:
            print("unknown")
        }
    }
  • source
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

11/24/2017

First impression on iPhone X

 6:47 PM     Face ID, iPhone X, iPhone X Plus, Touch ID     No comments   

Face ID

  • Sometimes I feel it’s better than Touch ID. For example, when I see a notification on the Lock screen glancing it is the only thing to read it.
  • Sometimes I miss Touch ID. For example when I download and install an app on the App Store I need to double click the upper right button to get it done. In this case Touch ID is better user experience than Face ID.
  • A few apps don’t support Face ID yet. So it is not good for iPhone X usage.

iPhone X Plus

I have used iPhone 6 Plus for 3 years and now I changed my main phone to iPhone X. What I feel is a smaller form factor of iPhone X makes me uncomfortable to use when I type. Probably my hands has been accustomed to use a bigger form factor. So I think that iPhone X Plus will be released in the next year.

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

11/20/2017

How can I fix node-gyp install error?

 7:11 AM     node, node-gyp, server, ubuntu     No comments   

I have met this error when I try to migrate my service to a different server. At first, I tried to config Python environment with the command below.

sudo apt-get install git python2.7
npm config  set python python2.7

Then I tried to build it again and met another error. So I reinstall build-essential package in my Ubuntu server.

 sudo apt-get install build-essential
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Newer Posts Older Posts Home

Search This Blog

Popular Posts

  • Git ignore vs Git exclude
  • Keynote Tutorial Character Style , How to use a character style in Keynote
  • If you can't get OAuth Token by SFSafariViewController...?
  • Bitbucket authentication error, Invalid username and password
  • OmniFocus Review Perspective action using Launch Center Pro

Blog Archive

  • ▼  2020 (2)
    • ▼  January (2)
      • Error- helm docker-registry does not have any acti...
      • How to clean up none docker images
  • ►  2019 (21)
    • ►  December (2)
    • ►  November (6)
    • ►  October (5)
    • ►  September (2)
    • ►  August (3)
    • ►  July (2)
    • ►  June (1)
  • ►  2017 (11)
    • ►  December (2)
    • ►  November (2)
    • ►  July (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (3)
  • ►  2016 (48)
    • ►  December (3)
    • ►  November (2)
    • ►  September (1)
    • ►  August (10)
    • ►  July (5)
    • ►  June (7)
    • ►  May (2)
    • ►  April (18)
Powered by Blogger.

Navigation Menu

  • Home
  • About
  • Documentation
  • Contact

Contact Us

Name

Email *

Message *

Copyright © Victor Choi | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates